home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-11-15 | 2.7 KB | 103 lines | [TEXT/PJMM] |
- { ircle - Internet Relay Chat client }
- { File: IRCInit }
- { Copyright © 1992 Olaf Titz (s_titz@ira.uka.de) }
-
- { This program is free software; you can redistribute it and/or modify }
- { it under the terms of the GNU General Public License as published by }
- { the Free Software Foundation; either version 2 of the License, or }
- { (at your option) any later version. }
-
- { This program is distributed in the hope that it will be useful, }
- { but WITHOUT ANY WARRANTY; without even the implied warranty of }
- { MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the }
- { GNU General Public License for more details. }
-
- { You should have received a copy of the GNU General Public License }
- { along with this program; if not, write to the Free Software }
- { Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. }
-
- unit IRCInit;
- { Startup code. }
-
- interface
- uses
- TCPTypes, TCPStuff, TCPConnections, Coroutines, ApplBase, {}
- MiscGlue, MsgWindows, InputLine, {}
- IRCGlobals, IRCaux, IRCPreferences, IRCInput, {}
- IRCNotify, IRCIgnore, DCC, IRCCommands, IRCChannels, IRCSComm, IRCHelp;
-
- function IRCInitAll: boolean;
- { This will call ALL module startups and init ALL global variables. }
- { Returns false if program cannot be run. }
-
- implementation
-
- { Putting this module of 400+ bytes of code into an extra segment }
- { is a typical instance of memory management paranoia :-) }
-
- function IRCInitAll: boolean;
- var
- i: integer;
- s: str255;
- b: boolean;
- m: MenuHandle;
- begin
- i := InitConnections;
- if i <> noErr then begin
- NumToString(i, s);
- ParamText(s, '', '', '');
- i := Alert(A_TCPERR, nil);
- IRCInitAll := false
- end
- else begin
- InitCoroutines;
- ApplInit;
- WNETime := 1;
- InitMsgWindows;
- InitInputLine;
- InitIRCPreferences;
- InitDCC;
- InitIRCChannels;
- InitIRCInput;
- InitIRCHelp;
- InitIRCNotify;
- InitIRCIgnore;
- ISOEncode := TableHndl(GetResource('Tabl', 256));
- ISODecode := TableHndl(GetResource('Tabl', 257));
- CmdChar := '/';
- CurrentServer := '';
- CurrentTarget := '';
- lastInvite := '';
- lastMSG := '';
- currentNick := '';
- flushing := false;
- logging := false;
- readTimeout := 10;
- GetDateTime(idleTime);
- UserRegistered := false;
- QuitRequest := false;
- IsAway := false;
- inBackground := false;
- notified := false;
- lastWindow := nil;
- NFT := 0;
- Watch := GetCursor(WatchCursor);
- showJOIN := true;
- showPART := true;
- showQUIT := true;
- showWALLOPS := true;
- showTOPIC := true;
- showINVITE := true;
- showNICK := true;
- showMODE := true;
- showKICK := true;
- showNAMES := true;
- IRCInitAll := true;
- m := GetMHandle(M_FONT);
- AddResMenu(m, 'FONT');
- AdjustFontMenu;
- DrawMenuBar;
- end;
- end;
-
- end.